package com.headwind.logistics.operation.service.impl;

import com.headwind.logistics.operation.dto.FetchMoneyPaymentTransportUserDto;
import com.headwind.logistics.operation.mapper.WithdrawMoneyRechargeDaoInter;
import com.headwind.logistics.operation.service.inter.WithdrawMoenyRechargeBizInter;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author 周鑫
 * @Date 2020/7/24 14:58
 * @Version 1.0
 * @DESCRIPTION 填写类作用描述
 */
@Service
public class WithdrawMoneyRechargeBizImpl implements WithdrawMoenyRechargeBizInter {

    @Resource
    WithdrawMoneyRechargeDaoInter withdrawMoneyRechargeDaoInter;


    /**
     * 查询所有和分页
     * @param page 页码
     * @param rows 行数
     * @return dto集合对象
     */
    @Override
    public List<FetchMoneyPaymentTransportUserDto> queryAlltoRechargeBizInter(@Param("page") Integer page, @Param("rows") Integer rows) {

        if (page != null){
            page = (page-1)*rows;
        }
        return withdrawMoneyRechargeDaoInter.queryAlltoDaoInter(page,rows);
    }
}
